package com.xuecheng.manage_course.client;

import com.xuecheng.framework.domain.cms.CmsPage;
import com.xuecheng.framework.domain.cms.request.QueryPageRequest;
import com.xuecheng.framework.domain.cms.response.CmsPageResult;
import com.xuecheng.framework.domain.course.response.PreviewResult;
import com.xuecheng.framework.domain.course.response.PublishResult;
import com.xuecheng.framework.model.response.QueryResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Description: 远程调用微服务接口
* @Param:
* @return:
* @Author: Mr.Yuan
* @Date:
*/
@FeignClient(value = "XC-SERVICE-MANAGE-CMS")
public interface CmsClient {
    @GetMapping("/cms/list/{page}/{size}")
    public QueryResponseResult findList(@PathVariable("page") int page, @PathVariable("size") int size, QueryPageRequest q);

    @PostMapping("/cms/findById/{id}")
    public CmsPageResult findById(@PathVariable("id") String id);
//保存页面信息，预览
    @PostMapping("/cms/savePageByCourse")
    public CmsPageResult savePageByCourse(CmsPage cmsPage);
//一键发布
    @PostMapping("/cms/onekeypublish")
    public PublishResult oneKeyPublish(CmsPage cmsPage);
}